<?php
class calender_m extends m {
  function __construct()
  {
    parent::__construct();
    $this->table = 'calender';
    $this->fields = array('uid','uname','date','task');
  }
  
  function get_by_date($uid = 1,$date)
  {
    $r = $this->db->query("select * from calender where date='$date' and uid='$uid'");
    return is_array($r[0])?$r[0]:array();
  }
}
